<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            perspective: 600px;
        }
        .da{
            width: 200px;
            height: 200px;
            margin: 100px auto;
            position: relative;
            transition: all 5s;
            transform-style: preserve-3d;
        }
        .dibu{
            background-color: cornflowerblue;
            position: absolute;
            top: 0px;
            width: 200px;
            height: 200px;
            opacity: 70%;
            transform: translateZ(-100px);
        }
        .mian{
            background-color: gold;
            width: 200px;
            height: 200px;
            opacity: 70%;
            transform: translateZ(100px);
        }
        .da:hover{
            transform: rotate3d(1,1,0,360deg);
        }
        .shang{
            width: 200px;
            height: 200px;
            background-color: cyan;
            position: absolute;
            bottom: 100px;
            left: 0;
            opacity: 70%;
            transform: rotate3d(1,0,0,270deg);
        }
        .xia{
            width: 200px;
            height: 200px;
            background-color: fuchsia;
            position: absolute;
            top: 100px;
            left: 0;
            opacity: 70%;
            transform: rotate3d(1,0,0,270deg);
        }
        .you{
            width: 200px;
            height: 200px;
            background-color: lightgreen;
            position: absolute;
            top: 0;
            opacity: 70%;
            left: 100px;
            transform: rotateY(90deg);
        }
        .zuo{
            width: 200px;
            height: 200px;
            background-color: brown;
            position: absolute;
            top: 0;
            opacity: 70%;
            right: 100px;
            transform: rotateY(90deg);
        }
      

    </style>
</head>
<body>
    <div class="da">
        <div class="shang"></div>
        <div class="mian"></div>
        <div class="dibu"></div>
        <div class="you"></div>
        <div class="zuo"></div>
        <div class="xia"></div>
    </div>
</body>
</html>